<template>
  <el-card shadow="never" class="mb20">
    <div class="table-page-search-wrapper">
      <el-form :model="form" ref="form" :inline="true" label-width="60px">
        <el-row :gutter="16">
          <el-col :span="6">
            <el-form-item label="姓名" prop="name">
              <el-input v-model="form.name" placeholder="输入姓名搜索" />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item>
              <el-tooltip class="item" effect="dark" content="查询" placement="top">
                <el-button icon="el-icon-search" type="primary" @click="handleSearch" />
              </el-tooltip>
              <el-tooltip class="item" effect="dark" content="重置" placement="top">
                <el-button icon="el-icon-refresh-right" @click="handleReset" />
              </el-tooltip>
            </el-form-item>
          </el-col>
          <!-- <el-tooltip class="item" effect="dark" content="新增" placement="top">
            <el-button class="fr" icon="el-icon-plus" @click="handleAdd" type="primary" />
          </el-tooltip>-->
        </el-row>
      </el-form>
    </div>
  </el-card>
</template>

<script>
export default {
  data() {
    return {
      form: {}
    }
  },
  methods: {
    handleSearch() {
      this.$emit('search', this.form)
    },
    handleAdd() {
      this.$emit('addUser')
    },
    handleReset() {
      this.$refs.form.resetFields()
      this.handleSearch()
    }
  }
}
</script>
